package com.ctrip.ec.api.mobile.controller;

import com.ctrip.ec.api.mobile.aop.AuthLogin;
import com.ctrip.ec.api.mobile.common.PagerInfo;
import com.ctrip.ec.api.mobile.common.RequestContext;
import com.ctrip.ec.api.mobile.common.ResultBody;
import com.ctrip.ec.api.mobile.interceptor.MemberAuth;
import com.ctrip.ec.biz.entity.goods.GoodsEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by jiangzy on 2018/9/3.
 */
@RestController
@RequestMapping("home")

public class HomeController {
        @GetMapping("list")
        public List<GoodsEntity> list(){

            List<GoodsEntity> list = new ArrayList<>();
            GoodsEntity ent = new GoodsEntity();
            ent.setName("hello");
            list.add(ent);
            RequestContext.setResponseHeaderPager(new PagerInfo(100,1,10));
            return list;
        }

}
